//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Collections;
using CommunityServer.Blogs.Components;
using CommunityServer.Controls;

namespace CommunityServer.Blogs.Controls
{
	/// <summary>
    /// Summary description for AggregateRollerColumn.
	/// </summary>
	public class AggregateRollerColumn : WeblogBaseTemplatedWebControl
	{
        public AggregateRollerColumn()
		{
		}

		AggregateGroupList ByGroup = null;

	    protected override void AttachChildControls()
	    {
			ByGroup = FindControl("ByGroup") as AggregateGroupList;
		}

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.EnsureChildControls();

            ArrayList groups = WeblogGroups.GetWeblogGroups(true,false,false);

			if (ByGroup != null)
			{
				ByGroup.DataSource = groups;
				ByGroup.DataBind();
			}
		}

	}
}
